//
//  DoctorInfoController.m
//  easystudy
//
//  Created by kane on 16/8/30.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "DoctorInfoController.h"

@interface DoctorInfoController ()
{
    __weak IBOutlet UIImageView *avatarIV;
    __weak IBOutlet UILabel *doctorNameLbl;
    __weak IBOutlet UILabel *hospitalNameLbl;
    __weak IBOutlet UILabel *descLbl;
    __weak IBOutlet UILabel *interestLbl;
    
    __weak IBOutlet UIView *coverView;
    __weak IBOutlet UIButton *shareCancelBtn;
}

@end

@implementation DoctorInfoController
@synthesize dataInfo,hospitalName;

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)initUI{
    self.edgesForExtendedLayout = UIRectEdgeNone;
    
    [shareCancelBtn drawCornerRadius:5];
    [shareCancelBtn drawBorderColor:[UIColor lightGrayColor] Width:1];
    
    [avatarIV drawCornerRadius:avatarIV.width/2];
    hospitalNameLbl.text = hospitalName;
    doctorNameLbl.text = [NSString stringWithFormat:@"%@\t%@",dataInfo[@"name"],dataInfo[@"position"]];
    descLbl.text = dataInfo[@"brief"];
    descLbl.numberOfLines = 4;
    [descLbl sizeToFit];
    
    interestLbl.text = dataInfo[@"goodat"];
}

- (IBAction)backBtnPressed:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (IBAction)shareBtnPressed:(id)sender
{
    coverView.hidden = NO;
}

- (IBAction)coverBtnPressed:(id)sender
{
    coverView.hidden = YES;
}

- (IBAction)cancelShare:(id)sender
{
    coverView.hidden = YES;
}

@end
